//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.ryzom.nel.misc;

public class CSystemInfo {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CSystemInfo(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CSystemInfo obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_CSystemInfo(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static String getOS() {
    return nelmiscJNI.CSystemInfo_getOS();
  }

  public static String getProc() {
    return nelmiscJNI.CSystemInfo_getProc();
  }

  public static java.math.BigInteger getProcessorFrequency(boolean quick) {
    return nelmiscJNI.CSystemInfo_getProcessorFrequency__SWIG_0(quick);
  }

  public static java.math.BigInteger getProcessorFrequency() {
    return nelmiscJNI.CSystemInfo_getProcessorFrequency__SWIG_1();
  }

  public static boolean hasCPUID() {
    return nelmiscJNI.CSystemInfo_hasCPUID();
  }

  public static boolean hasMMX() {
    return nelmiscJNI.CSystemInfo_hasMMX();
  }

  public static boolean hasSSE() {
    return nelmiscJNI.CSystemInfo_hasSSE();
  }

  public static long getCPUID() {
    return nelmiscJNI.CSystemInfo_getCPUID();
  }

  public static boolean hasHyperThreading() {
    return nelmiscJNI.CSystemInfo_hasHyperThreading();
  }

  public static boolean isNT() {
    return nelmiscJNI.CSystemInfo_isNT();
  }

  public static String availableHDSpace(String filename) {
    return nelmiscJNI.CSystemInfo_availableHDSpace(filename);
  }

  public static java.math.BigInteger availablePhysicalMemory() {
    return nelmiscJNI.CSystemInfo_availablePhysicalMemory();
  }

  public static java.math.BigInteger totalPhysicalMemory() {
    return nelmiscJNI.CSystemInfo_totalPhysicalMemory();
  }

  public static java.math.BigInteger getAllocatedSystemMemory() {
    return nelmiscJNI.CSystemInfo_getAllocatedSystemMemory();
  }

  public static java.math.BigInteger virtualMemory() {
    return nelmiscJNI.CSystemInfo_virtualMemory();
  }

  public static boolean getVideoInfo(SWIGTYPE_p_std__string deviceName, SWIGTYPE_p_unsigned_long_long driverVersion) {
    return nelmiscJNI.CSystemInfo_getVideoInfo(SWIGTYPE_p_std__string.getCPtr(deviceName), SWIGTYPE_p_unsigned_long_long.getCPtr(driverVersion));
  }

  public CSystemInfo() {
    this(nelmiscJNI.new_CSystemInfo(), true);
  }

}
